Snapping to text columns while scrolling

ABSTRACT

A method and apparatus for scrolling a electronic document including text, which is displayed on a display screen, including processing user input received via an input device of the computer, detecting an initiating event and pointer movement for a drag operation from the processed user input, scrolling textual content in the document according to the pointer movement of the drag operation, and automatically re-scrolling the textual content to offset a horizontal component of the scrolling of the textual content according to the drag operation.

FIELD OF THE INVENTION

The invention relates generally to electronic devices for displaying andscrolling text and, particularly, to configuring such devices toautomatically scroll a portion of the text back into the viewport.

BACKGROUND OF THE INVENTION

Computer users can use a variety of applications, such as web browsersand word processing programs, to open and read electronic documentscomprised of text, and possibly other types of content. Furthermore,specialized computer devices have been developed (e.g., the e-book)whose primary application is to display electronic text to a user.According to a conventional interface, a clicking device, such as amouse or touchpad, may be used for clicking on a scrollbar and moving itin one of two possible directions (up and down, or left and right) forscrolling the document. Generally, such an interface also allows theuser to simply click on a scroll arrow in order to scroll the documentin the corresponding direction. A similar type of interface can beimplemented using a touch screen, where the user simply touches thescrollbar or the scroll arrow rather than clicking on it.

However, the operation of clicking and moving a scrollbar, or clicking ascroll arrow, becomes more problematic as the size of computer devices(and thus their displays) are made increasingly smaller. As such,another type of interface allows for the use of a “drag” or “panning”operation to scroll the document. Basically, the drag/panning operationis initiated by an event which initiates the dragging operation by“grabbing” the document, coupled with a continuous movement which then“drags” the document in the desired direction. For purposes of thisdescription and the accompanying claims, the term “initiating event” isused to refer to the event initiating the aforementioned drag/panningoperation by grabbing the document, while the term “pointer movement” isused to refer to the accompanying movement which drags the document.

For instance, a mouse click may be the initiating event for the draggingoperation, while a subsequent movement of the mouse is the pointermovement which drags the document. Alternatively, for a touchscreeninterface, the initial touch of a finger or stylus may be the initiatingevent, and the subsequent movement of the finger/stylus across thedisplay may be the pointer movement causing the document to be dragged.

Also, enhancements have been made to such interfaces to allow for thescrolling operation to continue for some distance, after the pointermovement has terminated, to simulate momentum of the pointer movement.The distance of continued scrolling can be calculated based on anycombination of speed, distance, acceleration and power of the pointermovement. This could allow the user to quickly scroll the text using aquick “flick” of his finger in an appropriate direction.

One drawback of interfaces utilizing drag or panning operations is that,while attempting to scroll the text up or down, the user mayaccidentally scroll the document a little to the left or right, therebycausing the text to be misaligned with the viewport. An example of thiswill be described herein with respect to FIGS. 1A-1E.

Particularly, FIG. 1A illustrates an example of a document 100 whosecontent includes title or heading text 105, text 110 in the body of thedocument, and an image 120. The text 110 in the body of the document 100is formatted into two columns 110A and 110B, respectively. As shown inFIG. 1B, when the document 100 is electronically displayed on acomputing device, the viewport 130 of the device may only be capable ofdisplaying a portion of the text 110A in the left-hand column at a giventime. FIG. 1B further shows that a user may attempt to scroll down thetext 110A through a drag operation in which the initiating event (e.g.,an initial touch of the screen by a finger/stylus) at 140 grabs thedocument 100, and the pointer movement 150 (e.g., a movement of thefinger/stylus in the direction of the arrow) drags the document 100,resulting in another portion of the document being displayed in theviewport 130 as shown in FIG. 1C. The user may continue to scroll byrepeating such a drag operation as shown in FIGS. 1C and 1D, resultingin the document 100 being displayed according to FIG. 1E.

However, as illustrated by the arrows in FIGS. 1B-1D, the pointermovements 150 by the user may not be perfectly vertical, but instead maydrift a little bit in a horizontal direction, e.g., to the left. As aresult, the user might accidentally scroll a portion of the text 110Aout of the left-hand side of the viewport 130 as a result of thescrolling, as illustrated in FIG. 1E. Accordingly, this would require anadditional horizontal scrolling operation by the user (not shown) merelyto align the text column 110A back into the viewport 130.

Thus, it would be advantageous to employ some mechanism to automaticallyscroll electronic text back into place if it is scrolled slightlyhorizontally while the user is trying to scroll vertically.

SUMMARY OF THE INVENTION

A system and method is provided for scrolling a electronic documentincluding text, which is displayed on a display screen, includingprocessing user input received via an input device of the computer,detecting an initiating event and pointer movement for a drag operationfrom the processed user input, scrolling textual content in the documentaccording to the pointer movement of the drag operation, andautomatically re-scrolling the textual content to offset a horizontalcomponent of the scrolling of the document according to the dragoperation.

According to an exemplary embodiment, the horizontal component ofscrolling may be detected as a distance in a horizontal direction, andthe automatic re-scrolling may be performed in response to adetermination that such distance is within a correction threshold. Forinstance, the correction threshold may be determined based on thehorizontal component and a vertical component of the scrolling that hasbeen performed according to the drag operation.

According to another exemplary embodiment, a horizontal border for ablock of the textual content (e.g., text column) may be calculated. Insuch an embodiment, the automatic re-scrolling may be performed byanalyzing the position of such borders in relation to the viewport. Afurther exemplary embodiment might allow reduce the horizontal speed orrate of scrolling when the edge of the viewport crosses into ahorizontal border of the text block being scrolled.

Further scope of applicability of the present invention will becomeapparent from the detailed description given hereinafter. However, itshould be understood that the detailed description and specificexamples, while indicating preferred embodiments of the invention, aregiven by way of illustration only, since various changes andmodifications within the spirit and scope of the invention will becomeapparent to those skilled in the art from this detailed description.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will become more fully understood from thedetailed description given hereinbelow and the accompanying drawingswhich are given by way of illustration only, and thus are not limitativeof the present invention, and wherein

FIG. 1A illustrates an example of an electronic document including textwhich may be displayed on a computing device, and FIGS. 1B-1E illustratean example of how scrolling by a user may unintentionally move some ofthe text in the document outside of the viewport of a computing device;

FIG. 2 is a diagram illustrating a computing device that can be used forimplementing exemplary embodiments of the present invention;

FIG. 3 is diagram illustrating a user agent that may be used inconjunction with exemplary embodiments of the present invention;

FIG. 4 illustrates a flowchart of a process for automaticallyre-scrolling a document to re-align text to a viewport afterunintentional horizontal scrolling, according to an exemplaryembodiment;

FIGS. 5A-5B illustrate flowcharts for an exemplary embodiment of theprocess of FIG. 4 utilizing a correction threshold;

FIGS. 6A-6C illustrate flowcharts for particular exemplary embodimentsof the process of FIG. 4 utilizing a horizontal border for textualcontent;

FIGS. 7A-7B illustrate an example of an electronic document including ablock of text, and the application of a horizontal border in connectiontherewith, according to an exemplary embodiment;

FIGS. 8A-8F illustrate an example of how a horizontal border of a blockof text may be used to implement principles of the present invention,according to an exemplary embodiment;

The drawings will be described in detail in the course of the detaileddescription of the invention.

DETAILED DESCRIPTION

The following detailed description of the invention refers to theaccompanying drawings. The same reference numbers in different drawingsidentify the same or similar elements. Also, the following detaileddescription does not limit the invention. Instead, the scope of theinvention is defined by the appended claims and equivalents thereof.

The present invention is directed toward a computer-implemented methodand device to automatically scroll a block of text back into theviewport 130 of a computing device when it is determined that the userunintentionally dragged the text horizontally. This method may beimplemented as part of any application (web browser, e-book, wordprocessor) which displays a document comprising text, and allows theuser to scroll such document via a drag or panning operation.

For instance, in response to each drag operation for scrolling text inthe document, if there is a horizontal component to such scanning, itmay be compared to a correction threshold. If the horizontal componentwith less than the correction threshold, it can be determined that suchhorizontal movement was unintentional on the user's part thereby causingthe text to be automatically re-scrolled in the horizontal direction toits proper alignment with the viewport 130.

However, in another exemplary embodiment, horizontal borders (i.e.,left- and right-side borders) can be added to the block of text beingscrolled. If a drag operation causes an edge of the viewport 130 topartially enter either horizontal border, the text can be automaticallyre-scrolled to properly align the viewport 130 with the horizontalborders. Furthermore, the scrolling rate may be slowed down when theviewport 130 edge enters

FIG. 2 illustrates a generalized computing device 200 that can be usedas an environment for implementing various aspects of the presentinvention. According to exemplary embodiments, it is contemplated thatthe computer device 100 may be implemented as a mobile or handhelddevice, e.g., a personal digital assistant (PDA), mobile telephone,e-book device, etc. However, the principles of the present invention maybe applied to other types of computer devices 100, such as desktopcomputer, laptop computers, and any other type of computer device 100 aswill be contemplated by those of ordinary skill in the art.

In FIG. 2, a computing device 200 has various functional componentsincluding a central processor unit (CPU) 201, memory 202, communicationport(s) 203, a video interface 204, and a network interface 205. Thesecomponents may be in communication with each other by way of a systembus 206.

The memory 202, which may include computer-readable storage media suchas ROM, RAM, flash memory, hard drives, or any other combination offixed and removable memory, stores the various software components ofthe system. The software components in the memory 202 may include abasic input/output system (BIOS) 241, an operating system 242, variouscomputer programs 243 including applications and device drivers, varioustypes of data 244, and other executable files or instructions such asmacros and scripts 245.

The communication ports 203 may be connected to one or more localdevices 210 such as user input devices, a printer, a media player,external memory devices, and special purpose devices such as e.g. aglobal positioning system receiver (GPS). Communication ports 203, whichmay also be referred to as input/output ports (I/O), may be anycombination of such ports as USB, PS/2, RS-232, infra red (IR),Bluetooth, printer ports, or any other standardized or dedicatedcommunication interface for local devices 210.

As discussed above, the computing device 200 may include one or moreuser input devices among the local devices 210 of FIG. 2. Among theinput device(s) there may be a pointer device, i.e., an input devicewhich allows the user to control the position of a pointer or cursor onthe screen. Such pointer devices also allow the user to click on, orperform a similar action for activating a particular function (e.g.,select a displayed element) when the pointer/cursor is at a desiredscreen position. Examples of such pointer devices include an electronicmouse, a trackball device, and a touchpad.

The video interface device 204 is connected to a display unit 220.According to exemplary embodiments, the display unit 220 may include atouch-sensitive screen allowing the display unit 220 to double as atouch-sensitive input device. The touch-sensitive input device aspectsof the display unit 220 may be considered as one of the local devices210 communicating over a communication port 203. Further, for exemplaryembodiments in which the computing device 200 is implemented as a PDA,mobile telephone, or other small portable devices, the display willgenerally be an integrated display such as an LCD display. However, itwill be readily apparent that the principles of the present inventionmay be applied to situations where the display unit 220 is notintegrated with the other elements of the computing device 200, e.g.,where the display unit 220 is a standalone monitor.

The network interface device 205 provides the computing device 200 withthe ability to connect to a network in order to communicate with aremote device 230. The communication network, which in FIG. 2 is onlyillustrated as the line connecting the network interface 205 with theremote device 230, may be, e.g., a local area network or the Internet.The remote device 230 may in principle be any computing device withsimilar communications capabilities as the device 200, but may typicallybe a server or some other unit providing a networked service.

It will be understood that the computing device 200 illustrated in FIG.2 is not limited to any particular configuration or embodiment regardingits size, resources, or physical implementation of components. Forexample, more than one of the functional components illustrated in FIG.2 may be combined into a single integrated unit of the device 200. Also,a single functional component of FIG. 2 may be distributed over severalphysical units. Other units or capabilities may of course also bepresent. Furthermore, the device 200 may, e.g., be a general purposecomputer such as a PC, or a personal digital assistant (PDA), or even acellphone or a smartphone.

In an exemplary embodiment, various aspects of the present invention maybe incorporated into, or used in connection with, the components and/orfunctionality making up a user agent or browser installed as anapplication on a computing device 200. FIG. 3 shows an example of anumber of modules that may be present in such a user agent or browser.The modules will typically be software modules, or otherwise implementedby a programmer in software, and may be executed by the CPU 201.However, it is also possible for any of the modules of FIG. 3 to beimplemented as hardware, a combination of hardware and software, or“firmware,” as will be contemplated by those skilled in the art.

The user agent or browser 300 presents the user with a user interface301 that may be displayed on the display unit 220 shown in FIG. 2. Theuser interface 301 may include an address field 302 where the user mayinput or select the URL of a document or a service he or she wants theuser agent 300 to retrieve. For example, the user may use a keyboard orother type of input device to type in the URL in the address field 302.The address field 302 may also be a link that is displayed and may beactivated by the user by touch according to principles of the presentinvention (alternatively, such a link may also be activated using apointing device such as a mouse). Alternatively the URL may be specifiedin the code of a document or script already loaded by the user agent300.

In any case, the URL may be received by a window and input manager 303that represents the input part of the user interface 301 associatedwith, or part of, the user agent 300. The URL may then be forwarded to adocument manager 304, which manages the data received as part of thedocument identified by the URL.

The document manager 304 forwards the URL to a URL manager 305, whichinstructs a communication module 306 to request access to the identifiedresource. The communication module 306 may be capable of accessing andretrieving data from a remote device 230 such as a server over a networkusing the hypertext transfer protocol (HTTP), or some other protocolsuch as HTTPS or FTP. The communication module 306 may also be capableof accessing data that is stored in local memory 202.

If communication outside the device 200 is required to be encrypted,e.g., as specified by the protocol used to access the URL,encryption/decryption module 307 handles communication between the URLmanager 305 and the communication module 306.

The data received by the communication module 306 in response to arequest is forwarded to the URL manager 305. The URL manager 305 maythen store a copy of the received content in local memory 202 using acache manager 308 which administers a document and image cache 309. Ifthe same URL is requested at a later time, the URL manager 305 mayrequest it from the cache manager 308, which will retrieve the cachedcopy from the cache 309 (unless the cached copy has been deleted) andforward the cached copy to the URL manager 305. Accordingly, it may notbe necessary to retrieve the same data again from a remote device 230when the same URL is requested a second time.

The URL manager 305 forwards the data received from the communicationport 306 or cache 309 to a parser 310 capable of parsing content such asHTML, XML and CSS. The parsed content may then, depending on the typeand nature of the content, be processed further by an ECMAScript engine311, a module for handling a document object model (DOM) structure 312,and/or a layout engine 313.

This processing of the retrieved content is administered by the documentmanager 304, which may also forward additional URL requests to the URLmanager 305 as a result of the processing of the received content. Theseadditional URL's may, e.g., specify images or other additional filesthat should be embedded in the document specified by the original URL.

When the data representing the content of the specified document hasbeen processed it is forwarded from the document manager 304 in order tobe rendered by a rendering engine 314 and displayed on the userinterface 301. According to one possible embodiment, the renderingengine 314 may be responsible for carrying out processing regardingscrolling and automatic re-scrolling of the document, according toprinciples of the present invention which will be described in moredetail below in connection with FIGS. 4-8F. However, in an alternativeembodiment, the user interface 301 might be designed to carry outprocessing with respect to such scrolling and automatic re-scrolling. Itis even possible that the user agent 300 could be modified toincorporate another functional component (not shown) to perform suchprocessing.

The various modules thus described are executed by the CPU 201 of thecomputing device 200 as the CPU 201 receives instructions and data overthe system bus(es) 206. The communications module 306 communicates withthe remote device 230 using the network interface 205. The functionalityof various modules in FIG. 3 may of course be integrated into fewerlarger modules. Also, the functionality of a single module in FIG. 3 maybe distributed or replicated over several modules.

It will further be understood that, while the user agent 300 describedabove may be implemented as an application program 243, some of the useragent's 300 functionality may also be implemented as part of theoperating system 242 or even the BIOS 241 of the computing device 200.The content received in response to a URL request may be data 244,script 245, or a combination thereof as further described below.

Of course, the present invention is not limited to being implemented bya user agent 300 of a computing device 200. Other types of applicationprograms 243, which are capable of executing on the computing device200, may be configured to display, scroll, and automatically re-scrolltextual documents in accordance with the principles of the presentinvention described below. Examples of such applications 243 which maybe configured to implement the present invention include word processorsand e-book applications.

Reference is now made to FIG. 4, which illustrates a flowchart of aprocess 400 implemented in a computing device 200 for automaticallyre-scrolling a document to re-align text to a viewport 130 afterunintentional horizontal scrolling, according to an exemplaryembodiment. As shown in FIG. 4, an electronic document with textualcontent is displayed on the display unit 220 of the computing device 200according to operation 5410. According to operation 5420, the computingdevice 200 receives user input via an input device, such as a pointerdevice or touchscreen interface, to perform a drag operation on thedocument. In operation S430, such input is processed in order to detectthe initiating event (e.g., mouse click or initial touch byfinger/stylus) and the accompanying pointer movement defining the dragoperation. The document including its textual content is thus scrolledin accordance with the pointer movement of the drag operation, accordingto operation S440. A decision is made in operation S450 as to whethersuch scrolling of text included an unintentional horizontal componentwhich needs to be corrected. In other words, it is determined whetherthe user accidentally scrolled the text a little bit to the left orright while attempting to scroll the text up or down, such accidentalscrolling needing to be corrected. If operation S450 determines thatthere was an unintentional horizontal component to the scrolling whichneeds to be corrected, the textual content is automatically re-scrolledin operation S460 in order to offset such horizontal component, i.e., tore-scroll the text horizontally back to its original (or an otherwiseacceptable) alignment with respect to the viewport 130.

According to an exemplary embodiment, the determination of whether therewas an unintentional horizontal component due to the user's dragoperation in operation S450 can be performed through the use of acorrection threshold. FIGS. 5A-5B illustrate flowcharts for exemplaryembodiments of the process of FIG. 4 utilizing a correction threshold.

Particularly, the flowchart of FIG. 5A illustrates a particularexemplary embodiment for implementing operation S450 of FIG. 4. In FIG.5A, the horizontal component of the scrolling is detected as ahorizontal distance in operation S4500. A correction threshold isobtained according to operation S4510. This correction threshold may bestatic, i.e., a constant value programmed into the application 243implementing the process 400. Alternatively, the correction thresholdmay be variable, as will be explained below in connection with FIG. 5B.Referring again to FIG. 5A, operation S4520 determines whether or notthere is a horizontal component to the scrolling, i.e., whether thedetected horizontal distance is a value greater than 0. If so, anotherdecision is made in operation S4530 as to whether the detectedhorizontal distance is less than the correction threshold.

Particularly, operation S4530 makes an attempt to determine whether ornot the user actually intended to scroll horizontally across the textualcontent. For instance, considering the example document illustrated inFIG. 1A, if user was trying to scroll horizontally from the text column110A to look at the image 120, it could be assumed that the user woulddrag the document a significant distance to the left, i.e., that thehorizontal distance of such scrolling would be at least a certainamount. Therefore, according to operation S4530, it can be determinedwhether or not the user was intending to horizontally scroll thedocument by comparing the detected horizontal distance to the correctionthreshold. As such, if the horizontal distance is less than thecorrection threshold, a determination can be made that the horizontalcomponent of the scrolling per the user's drag operation wasunintentional, and should be offset according to operation S460 of FIG.4.

As described above, the correction threshold may be a static value. Forexample, it may be determined based on a characteristic of the displayunit 220 of the computing device 200. For instance, the correctionthreshold may be pre-set to an appropriate amount based on screen sizeor the dots-per-inch (DPI) of the display unit 220, using suchprocedures as will be readily apparent to persons ordinarily skilled inthe art.

However, in a further, the correction threshold may be variable,dependent on other factors which might indicate whether or not the userintended only to vertically scroll the text. For instance, such a factormay include a ratio between the vertical and horizontal distancesscrolled as a result of the drag operation. FIG. 5B includes a flowchartillustrating such an embodiment.

Particularly, FIG. 5B illustrates an exemplary embodiment forimplementing operation S4510 of FIG. 5A, i.e., obtaining the correctionthreshold, based on the horizontal and vertical components. In operationS45110, the vertical distance of the scrolling resulting from the user'sdrag operation is detected. According to operation S45120, thecorrection threshold may be calculated in relation to the detectedvertical distance. For instance, the correction threshold may beproportional to the vertical distance, or have some other relationcausing it to be smaller as a smaller vertical distance is detected.This could even be accomplished by taking a default correction threshold(e.g., determined based on DPI of the display unit 220) and multiplyingit by a factor which increases as the vertical distance increases. Itshould be noted that the calculation of the correction threshold inoperation S45120 may be accomplished in any manner which makes it easierto judge the horizontal scrolling component to be intentional as itbecomes relatively larger with respect to the vertical component.

Referring again to FIG. 4, the use of a correction threshold is merelybut one way to determine whether automatic re-scrolling of the text isnecessary according to operation S450. According to another exemplaryembodiment, the application of a horizontal border to the left and/orright sides of a block of textual content (e.g., column of text) may beused in operation S450, to determine whether it is necessary toautomatically re-scroll the text in order to offset an unintentionalhorizontal component of text scrolling.

FIG. 6A illustrates an alternative exemplary embodiment for implementingoperation S450 of FIG. 4, using at least one horizontal border appliedto the side(s) of the textual content of the document. According tooperation S4540, a determination is made regarding the block of textscrolled according to the user's drag operation. For example, the layoutof the document may include one or more columns of text, and adetermination may be made in as to which column is being viewed andscrolled according to the drag operation. In structured documents, e.g.,HTML and other markup language documents, it might be appropriate toanalyze the semantic constructs (elements) in the underlying code inoperation S4540 to determine the appropriate text block/column.

It should further be noted that principles of the present invention arenot limited to application to text blocks or columns, but could also beapplied to other types of content blocks of HTML or markup languagedocuments, including images and tables. In other words, if the user isattempting to scroll down a large image or table, the principles of thepresent invention could be used to automatically re-scroll theimage/table back into horizontal alignment with the viewport 130. Assuch, operation S4540 could be adapted to look for any type of contentblock being scrolled, e.g., any type of content inside tags such as <p>or <div>, not just text. Thus, even though the term “text block,” “textcolumn,” and the like are used throughout this description, the use ofsuch terms is not intended to limit the present invention, but insteadthe present invention could be applied to blocks containing other typesof content.

Referring again to FIG. 6A, according to operation S4550, at least onehorizontal border is determined for the text block or column. Forinstance, a border may be applied to the left side, the right side, orboth sides of the text column. An example of using both left and righthorizontal borders is illustrated in FIGS. 7A and 7B.

Particularly, FIG. 7A illustrates another example of an electronicdocument 700 including heading text 705, a column of textual content710, and an image 720. Applying operations S4540 and S4550 (FIG. 6A) todocument 700 (FIG. 7A), a horizontal border 730 could be determined foreither side of text column 710 as shown in FIG. 7B. Particularly, FIG.7B illustrates horizontal borders 730A and 730B being applied to theleft and right sides, respectively, of the text column 710. Whilehorizontal borders 730A and 730B are shown in FIG. 7B (and subsequentfigures) as shaded borders, the shading is only illustrated tofacilitate understanding. It is not necessary to modify the display ofdocument 700 as a result of determining or calculating horizontalborders 730; the use of such borders 730 may be made transparent to theuser.

Furthermore, it should be noted that the width of a horizontal border730 may be determined or calculated based on the characteristics of thedisplay unit 220 of the computing device 200, such as screen size orDPI. Screen size and DPI of different types of computing devices 200 canbe widely varied, even among different models of devices 200 by the samemanufacturer. If principles of the present invention described hereinwere carried out on different devices 200 of varying DPI's, by settinghorizontal borders 730 to the same width in terms of number of pixels,performance results for such devices 200 could vary. Thus, setting thewidth of horizontal borders 730 according to the DPI of each computingdevice 200 could help ensure a more consistent standard of performanceregardless of the screen size.

Referring again to FIG. 6A, a determination is made in operation S4560as to whether a horizontal border 730 at least partially exited theviewport 130, as a result of the drag operation and resultant scrolling.If the answer is no, a decision can be made that the horizontalcomponent of the scrolling (if any) is not significant, and thus doesnot need to be offset by re-scrolling. If, however, a horizontal border730 was determined to have exited the viewport 130 due to scrolling,processing continues to operation S4570.

In particular, operation S4570 determines whether an entire horizontalborder 730 exited the viewport 130. If the text scrolling caused anentire horizontal border 730 to exit viewport 130, a decision can bemade that the horizontal scrolling component was large enough to beintentional by the user, and thus there is no need to automaticallyre-scroll the text block. On the other hand, if operation S4570determines that a horizontal border 730 did not entirely exit theviewport 130, but instead one of the horizontal borders 730 onlypartially exited the viewport 130, it can be decided that the userunintentionally scrolled the text to the left or right side, and thatre-scrolling is necessary to offset this unintentional scrollingaccording to operation S460 of FIG. 4.

Together operations S4560 and S4570 determine whether the scrolling oftext by the drag operation resulted in the left or right edge of theviewport 130 getting stuck in the corresponding horizontal border 730.To illustrate an example of this, reference is now made to FIGS. 8A-8C.Particularly, these figures illustrate a sequence where the processillustrated in FIG. 6A would decide that automatic re-scrolling isnecessary, in order to offset an unintentional horizontal scrolling withrespect to the example document 700 illustrated in FIG. 7A.

Specifically, FIG. 8A illustrates the positioning of the document 700with respect to the viewport 130 of a computing device 200, whenreceiving an initiating event for a drag operation by the user. Asillustrated in this figure, horizontal borders 730A and 730B arecalculated for the column of text 710, which is the text blockdetermined to be within the viewport 130. FIG. 8B illustrates thesubsequent positioning of the document 700 (and text column 710) inrelation to the viewport 130, resulting from scrolling the column oftext 710 in accordance with the drag operation. As shown FIG. 8B, thescrolling caused the left horizontal border 730A to exit the left sideof the viewport 130, thus resulting in an affirmative decision inoperation S4560 of FIG. 6A. However, FIG. 8B also shows that neitherhorizontal border 730A nor horizontal border 730B entirely exited theviewport 130 during the scrolling, thus resulting in a negative decisionin operation S4570 of FIG. 6A. Accordingly, FIG. 8C shows that the textcolumn 710 is automatically re-scrolled to be properly alignedhorizontally with the viewport 130, as a result of operation S460 ofFIG. 4.

In contrast to FIGS. 8D-8F illustrate an example involving exampledocument 700, in which the process illustrated in FIG. 6A would decidenot to automatically re-scroll the text 710 in response to scrolling bythe user. Specifically, FIG. 8D illustrates the positioning of thedocument 700 and viewport 130, prior to the drag operation (similar toFIG. 8A). FIG. 8E illustrates the subsequent positioning of the document700 in relation to the viewport 130, resulting from the scrolling by theuser. While FIG. 8E shows that the scrolling caused the left horizontalborder 730A to exit the left side of the viewport 130, it further showsthat the entire horizontal border 730A also exited the viewport 130during scrolling. As a result, even both operations S4560 and S4570 ofFIG. 6A would be decided in the affirmative, thus indicating that thehorizontal scrolling was intentional by the user. Accordingly, as shownin FIG. 8F, automatic re-scrolling is not performed.

While exemplary embodiments of the invention described thus far relateto the automatic re-scrolling of text to offset unintentional horizontaldisplacement as a result of scrolling by the user, other aspects of thepresent invention may be implemented to help prevent the user fromaccidentally scrolling text out of the viewport 130.

For instance, a speed or rate of scrolling can be slowed down as theleft or right edge of the viewport 130 enters a respective horizontalborder 730. This means that, while the scrolling of operation S440 (FIG.4) causes the left or right edge of the viewport 130 to traverse acorresponding horizontal border 730, the speed of such scrolling may beautomatically reduced. The scrolling speed may be slowed down in thehorizontal direction only or, alternatively, in both horizontal andvertical directions. Generally, the rate or speed of scrolling isdefined in terms of number of pixels scrolled per number of pixelsdetected in the pointer movement.

FIG. 6B illustrates an exemplary embodiment of implementing operationS440 of FIG. 4 so that the horizontal speed of scrolling is slowed downas the left or right edge of the viewport 130 traverses a correspondinghorizontal border 730. According to operation S4410, a determination ismade as to the block of text being scrolled at the time the dragoperation is initiated by the user (e.g., column of text 710 in FIG.8A). In operation S4420 of FIG. 6B, a horizontal border 730 iscalculated for the left and/or right side of the text block (e.g.,horizontal borders 730A and 730B in FIG. 8A). As the text 710 isincrementally scrolled according to the pointer movement of the dragoperation, i.e., until operation S4430 of FIG. 6B determines that thepointer movement has terminated, it is repeatedly determined whether theleft or right edge of the viewport 130 is within a corresponding one ofthe left and right horizontal borders 730A and 730B. If not, scrollingis maintained at the default horizontal rate according to operationS4450. However, if the left/right edge of the viewport 130 is currentlywithin the left/right horizontal border 730A/730B, the horizontal rateof scrolling is reduced according to operation S4460 of FIG. 6B.

Based on this feature, the horizontal borders 730 can be thought of as“ridges” on the sides of the text 710. As such, the slow-down thatoccurs as each horizontal border 730 is being scrolled out of theviewport 130 would correspond to the “steepness” of the ridge.

Referring again to FIG. 6B, the amount by which the speed of horizontalscrolling is reduced in operation S4460 can be based on the direction ofscrolling. Thus, the ridges (i.e., horizontal borders 730) can be madesteeper as it becomes clearer that it is the user's intent to verticallyscroll the text based on the direction of scrolling. I.e., if the user'spointer movement is clearly in the horizontal direction, rather thanvertical, the steepness of the ridges may be kept low to make it easierfor the user to scroll horizontally.

Furthermore, as the user performs a series of drag operations in orderto scroll the text, the overall direction of scrolling may be used todetermine the steepness of the ridges. For instance, during each dragoperation, the overall direction of scrolling may be determined inrelation to where the initiating event of the first drag operationoccurred.

FIG. 6C illustrates a particular exemplary embodiment in which operationS4460 of FIG. 6B reduces the horizontal rate of scrolling based on theoverall scrolling direction, in response to a series of drag operationsby the user. In FIG. 6C, operation S44610 determines the positions ofthe initiating event for the first drag operation in the series.Operation S44620 calculates the total horizontal and vertical distancesscrolled since the start of the series of drag operations, based on theinitiating event position determined in operation S44610 the subsequentpointer movements up to and including the current drag operation. Inoperation S44630, a reduced horizontal rate is calculated based on thetotal horizontal and vertical distances.

For example, operation S44630 of FIG. 6C can be accomplished byselecting between two (or more) different values which can be used forreducing the horizontal scrolling rate, depending on the overalldirection of scrolling since the start of the series of drag operations.Particularly, if the overall direction of scrolling is primarilyhorizontal based on the total horizontal and vertical directionscalculated (e.g., if the total horizontal distance is longer than thetotal vertical distance), the horizontal scrolling rate may be reducedaccording to a first preset value. On the other hand, if the overalldirection of scrolling is primarily vertical (e.g., the total verticaldistance is longer than the total horizontal distance), another presetvalue may be applied to reduce the horizontal scrolling rate to an evenlarger degree.

There may be several different ways to perform such a selection. Belowis an example of computer code to implement such a selection betweenpreset reduced rates:

int speedDivider = abs(totalScrollX) > abs(totalScrollY)     ? DIVIDER_X    :DIVIDER_X * VERTICAL_MULTIPLIER; int reduced_horiz_rate =default_horiz_rate / speedDividerwhere:

-   -   reduced horiz_rate is the reduced horizontal scrolling rate;    -   default_horiz_rate is the default horizontal scrolling rate;    -   speedDivider is the factor by which the default horizontal        scrolling rate is reduced, according to a division operation;    -   totalScrollX and totalScrollY represents total scrolling        distances in the horizontal direction (x axis) and vertical        direction (y axis), respectively, since the series of drag        operations started;    -   DIVIDER_X represents a factor by which the horizontal scrolling        rate is to be reduced; and    -   VERTICAL_MULTIPLIER represents an additional factor by which the        horizontal scrolling rate is to be further reduced, if the        overall direction of scrolling is vertical, rather than        horizontal.

To explain the above example, it will be assumed that DIVIDER_X ispreset to the value 2, and VERTICAL_MULTIPLIER is preset to the value 5.Under these conditions, if the user's overall direction of scrolling isprimarily horizontal as the left or right edge of the viewport 130 isscrolled into the corresponding horizontal border 730, the reduced rateof horizontal scrolling is calculated as half of the default horizontalscrolling rate, i.e., default_horiz_rate divided by 2. Conversely, inthis example, if the user's overall direction of scrolling is primarilyvertical (e.g., with an accidental horizontal component) when the edgeof the viewport enters the horizontal border 730, the reduced rate ofhorizontal scrolling is calculated as one-tenth of the default rate,i.e., default_horiz_rate/(2*5).

It should be noted that FIGS. 6B and 6C are merely illustrative ofexemplary embodiments, and other methods can be implemented to calculateor modify the steepnesses of the horizontal borders 730 consistent withthe spirit and scope of the present invention. Also, the implementationof each horizontal border 730 as a ridge with a steepness is notrequired, but rather may be implemented an optional enhancement.

The invention being thus described, it will be obvious that the same maybe varied in many ways. Such variations are not to be regarded asdeparture from the spirit and scope of the invention, and all suchmodifications as would be obvious to one skilled in the art are intendedto be included within the scope of the following claims.

The invention claimed is:
 1. A method of scrolling an electronicdocument including multiple columns of text, which is displayed on acomputing device, the method comprising: utilizing at least oneprocessor in the computing device to perform the following: process userinput received via an input device; detect an initiating event andpointer movement for a drag operation from the processed user input;scroll textual content in the document according to the pointer movementof the drag operation; analyze semantic constructs in the underlyingmarkup language code to identify which of the multiple columns of textis being viewed and scrolled by the user; calculate a border width forthe identified column of text, and apply a border of the calculatedwidth on the left and/or right side of the identified column of text;determine whether the scrolling of the textual content caused at leastpart of the applied left or right side border of the identified columnof text to exit a viewport of a display screen of the electronic device;decrease a horizontal speed of the scrolling of the textual content,which is performed in accordance with the pointer movement, when an edgeof the applied left or right side border of the identified column oftext exits the viewport; and after the decrease to the horizontal speedis applied to the scrolling of the textual content, detect thehorizontal component of the scrolling of the textual content as adistance in a horizontal direction; and determine whether the distanceis within a correction threshold, wherein the automatic re-scrolling isperformed in response to a determination that the distance is less thanthe correction threshold, wherein the drag operation is part of a seriesof one or more drag operations detected by the at least one processorfrom the processed user input, wherein the at least one processordecreases the horizontal speed of the scrolling of the textual contentby: determining a total vertical distance and a total horizontaldistance scrolled since the initiating event of the first drag operationthe series; and analyzing the total vertical and horizontal distances,and wherein, in decreasing the horizontal speed of the scrolling of thetextual content, the at least one processor further: calculates a factorby which the horizontal speed of the scrolling of the textual content isto be decreased, such that the factor is calculated as a first presetvalue when the determined total horizontal distance exceeds thedetermined total vertical distance, and the factor is calculated as asecond preset value when the determined total vertical distance exceedsthe total horizontal distance, the second preset value being greaterthan the first preset value; and while continuing to scroll the textualcontent, scales down the horizontal speed of the scrolling according tothe pointer movement of the current drag operation by the calculatedfactor.
 2. The method of claim 1, wherein the at least one processor isfurther utilized to: detect a vertical component of the scrolling of thetextual content, the vertical component being determined as a distancein a vertical direction, wherein the correction threshold is determinedbased on the horizontal and vertical components of the scrolling of thetextual content.
 3. The method of claim 1, wherein the automaticre-scrolling is performed based on the determination of whether thescrolling of the textual content caused at least part of the appliedleft or right side border to exit the viewport.
 4. The method of claim3, wherein the automatic re-scrolling is performed in response todetermining that a portion less than the entire left or right sideborder exited the viewport as a result of the scrolling of the textualcontent.
 5. The method of claim 1, wherein the border width iscalculated based on the dots-per-inch (DPI) at which the document isdisplayed by the electronic device.
 6. An apparatus comprising: adisplay screen configured to display a document including multiplecolumns of text; an input device configured to receive user input; andat least one processor programmed to: process the user input receivedvia the input device; detect an initiating event and pointer movementfor a drag operation from the processed user input; scroll textualcontent in the document according to the pointer movement of the dragoperation; analyze semantic constructs in the underlying markup languagecode to identify which of the multiple columns of text is being viewedand scrolled by the user; calculate a border width for the identifiedcolumn of text, and apply a border of the calculated width on the leftand/or right side of the identified column of text; determine whetherthe scrolling of the textual content caused at least part of the appliedleft or right side border of the identified column of text to exit aviewport of the display screen; decrease a horizontal speed of thescrolling of the textual content, which is performed in accordance withthe pointer movement, when an edge of the applied left or right sideborder of the identified column of text exits the viewport; and afterthe decrease to the horizontal speed is applied to the scrolling of thetextual content, detect a horizontal component of the scrolling of thetextual content as a distance in a horizontal direction; determinewhether the distance is within a correction threshold; and performautomatic re-scrolling to offset the horizontal component in response toa determination that the distance is less than the correction threshold,wherein the drag operation is part of a series of one or more dragoperations detected by the at least one processor from the processeduser input, wherein the at least one processor is further programmed todecrease the horizontal speed of the scrolling of the textual contentby: determining a total vertical distance and a total horizontaldistance scrolled since the initiating event of the first drag operationin the series; and analyzing total vertical and horizontal distances,and wherein the at least one processor is further programmed to indecreasing the horizontal speed of the scrolling of the textual content,calculate a factor by which the horizontal speed of the scrolling of thetextual content is to be decreased, such that the factor is calculatedas a first preset value when the determined total horizontal distanceexceeds the determined total vertical distance, and the factor iscalculated as a second preset value when the determined total verticaldistance exceeds the total horizontal distance, the second preset valuebeing greater than the first preset value; and while continuing toscroll the textual content, scale down the horizontal speed of thescrolling according to the pointer movement of the current dragoperation by the calculated factor.
 7. The apparatus of claim 6, whereinthe at least one processor is further programmed to: detect a verticalcomponent of the scrolling of the textual content, the verticalcomponent being determined as a distance in a vertical direction,wherein the correction threshold is determined based on the horizontaland vertical components of the scrolling of the textual content.
 8. Theapparatus of claim 6, wherein the automatic re-scrolling is performedbased on the determination of whether the scrolling of the textualcontent caused at least part of the applied left or right side border toexit the viewport.
 9. The apparatus of claim 8, wherein the automaticre-scrolling is performed in response to the at least one processordetermining that a portion less than the entire applied left or rightside border exited the viewport as a result of the scrolling of thetextual content.
 10. The apparatus of claim 8, wherein the border widthis calculated based on the dots-per-inch (DPI) at which the document isdisplayed on the display screen.
 11. A non-transitory computer-readablestorage medium having embodied thereon a program that, when executed bya computer, causes it to perform a method of scrolling an electronicdocument including multiple columns of text, which is displayed on adisplay screen of the computer, the method comprising: processing userinput received via an input device of the computer; detecting aninitiating event and pointer movement for a drag operation from theprocessed user input; scrolling textual content in the documentaccording to the pointer movement of the drag operation; analyzingsemantic constructs in the underlying markup language code to identifywhich of the multiple columns of text is being viewed and scrolled bythe user; calculating a border width for the identified column of text,and apply a border of the calculated width on the left and/or right sideof the identified column of text; determining whether the scrolling ofthe textual content caused at least part of the applied left or rightside border of the identified column of text to exit a viewport of adisplay screen of the electronic device; decreasing a horizontal speedof the scrolling of the textual content, which is performed inaccordance with the pointer movement, when an edge of the applied leftor right side border of the identified column of text exits theviewport; and after the decreasing of the horizontal speed of thescrolling of the textual content, detecting a horizontal component ofthe scrolling of the textual content as a distance in a horizontaldirection; determining whether the distance is within a correctionthreshold; and performing automatic re-scrolling to offset thehorizontal component in response to a determination that the distance isless than the correction threshold, wherein the drag operation is partof a series of one or more drag operations detected by the at least oneprocessor from the processed user input, wherein the method decreasesthe horizontal speed of the scrolling of the textual content by:determining a total vertical distance and a total horizontal distancescrolled since the initiating event of the first drag operation in theseries; and analyzing the total vertical and horizontal distances, andwherein, in decreasing the horizontal speed of the scrolling of thetextual content, the method further comprises: calculating a factor bywhich the horizontal speed of the scrolling of the textual content is tobe decreased, such that the factor is calculated as a first preset valuewhen the determined total horizontal distance exceeds the determinedtotal vertical distance, and the factor is calculated as a second presetvalue when the determined total vertical distance exceeds the totalhorizontal distance, the second preset value being greater than thefirst preset value; and while continuing to scroll the textual content,scaling down the horizontal speed of the scrolling according to thepointer movement of the current drag operation by the calculated factor.12. The computer-readable storage medium of claim 11, wherein the methodfurther comprises: detecting a vertical component of the scrolling ofthe textual content, the vertical component being determined as adistance in a vertical direction, wherein the correction threshold isdetermined based on the horizontal and vertical components of thescrolling of the textual content.
 13. The computer-readable storagemedium of claim 11, wherein the automatic re-scrolling is performedbased on the determination of whether the scrolling of the textualcontent caused at least part of the applied left or right side border toexit the viewport.
 14. The computer-readable storage medium of claim 13,wherein the automatic re-scrolling is performed in response todetermining that a portion less than the entire applied left or rightside border exited the viewport as a result of the scrolling of thetextual content.
 15. The method of claim 13, wherein the border width iscalculated based on the dots-per-inch (DPI) at which the document isdisplayed by the computer.